package netdb.courses.softwarestudio.smail.mvc.model.domain;

import javax.persistence.Id;

/**
 * The class of domain objects corresponding to the "mail" resources.
 */
public class Mail {
    @Id
    private Long id;
    private String title;
    private String text;
    private long stamp;
    private long like=0l;  //like face book

    public Mail() {
        super();
    }

    public Mail(String title, String text) {
    	this.title = title;
    	this.text = text;
    }

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public long getStamp() {
		return stamp;
	}

	public void setStamp(long stamp) {
		this.stamp = stamp;
	}
	
	public long getLike() {
		return like;
	}
	
	public void setLike() {
		this.like = like+1;
	}

}
